package com.iplant.pdm.service.po.bop.partpoint;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 工艺工序-工艺参数
 *
 * @author YouWang·Peng
 * 2023-10-12 10:15:23
 */
@DBBasePO(TableName = "fpc_routepartpoint_parameter", CheckName = {"Code", "RouteID,RoutePartPointID," +
        "ProductParameter"},
        CodeAuto = true, CodePrefix = "FRPP-", CodeNum = 4, Schemas = DBSchemas.PDM)
public class FPCRoutePartPointParameter extends BasePO implements Serializable {
    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField
    public int RoutePartPointID = 0; // 工艺工序ID
    @DBJoin(name = "Name", tableName = "fpc_routepartpoint", tableAsName = "routepartpoint1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointName = ""; // 工艺工序名称
    @DBJoin(name = "Code", tableName = "fpc_routepartpoint", tableAsName = "routepartpoint1", Schemas = DBSchemas.PDM,
            MainTableField = "RoutePartPointID")
    public String RoutePartPointCode = ""; // 工艺工序编码

    /**
     * 产品参数（工艺）
     */
    @DBField
    public int ProductParameter = 0;

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String ParamName = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String ParamCode = "";

    @DBCondition
    @DBJoin(name = "ParamType", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public int ParamType = 0;

    /**
     * 标准类型
     */
    @DBJoin(name = "StandardType", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public int StandardType = 0;
    /**
     * 标准类型文本
     */
    public String StandardTypeText = "";
    /**
     * 标准值
     */
    @DBJoin(name = "TheoreticalValue", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String StandardValue = "";
    /**
     * 基准值
     */
    @DBJoin(name = "StandardBasic", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String StandardBasic = "";
    /**
     * 默认值
     */
    @DBJoin(name = "DefaultValue", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String DefaultValue = "";
    /**
     * 下限值
     */
    @DBJoin(name = "LowerTolerance", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public double StandardLeft = 0.0;
    /**
     * 上限值
     */
    @DBJoin(name = "UpperTolerance", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public double StandardRight = 0.0;

    /**
     * 关联采集编号（支持多个，逗号分隔）
     */
    @DBJoin(name = "CollectionNumber", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1",
            Schemas = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public String CollectionNumber = "";

    /**
     * 单位ID
     */
    @DBJoin(name = "UnitID", tableName = "fpc_product_parameter", tableAsName = "fpc_product_parameter1", Schemas
            = DBSchemas.PDM,
            MainTableField = "ProductParameter")
    public int UnitID = 0;
    /**
     * 单位名称
     */
    @DBJoin(name = "Name", tableName = "mss_unit", tableAsName = "mss_unit1", Schemas = DBSchemas.Basic,
            ConditionalJoin = "mss_unit1.ID=fpc_product_parameter1.UnitID", JoinIndex = 3)
    public String UnitName = "";
    /**
     * 单位编码
     */
    @DBJoin(name = "Code", tableName = "mss_unit", tableAsName = "mss_unit1", Schemas = DBSchemas.Basic,
            ConditionalJoin = "mss_unit1.ID=fpc_product_parameter1.UnitID", JoinIndex = 3)
    public String UnitCode = "";

    @JsonProperty("RoutePartPointID")
    public int getRoutePartPointID() {
        return RoutePartPointID;
    }

    public void setRoutePartPointID(int routePartPointID) {
        RoutePartPointID = routePartPointID;
    }

    @JsonProperty("RoutePartPointName")
    public String getRoutePartPointName() {
        return RoutePartPointName;
    }

    public void setRoutePartPointName(String routePartPointName) {
        RoutePartPointName = routePartPointName;
    }

    @JsonProperty("RoutePartPointCode")
    public String getRoutePartPointCode() {
        return RoutePartPointCode;
    }

    public void setRoutePartPointCode(String routePartPointCode) {
        RoutePartPointCode = routePartPointCode;
    }

    @JsonProperty("ProductParameter")
    public int getProductParameter() {
        return ProductParameter;
    }

    public void setProductParameter(int productParameter) {
        ProductParameter = productParameter;
    }

    @JsonProperty("ParamType")
    public int getParamType() {
        return ParamType;
    }

    public void setParamType(int paramType) {
        ParamType = paramType;
    }

    @JsonProperty("StandardType")
    public int getStandardType() {
        return StandardType;
    }

    public void setStandardType(int standardType) {
        StandardType = standardType;
    }

    @JsonProperty("StandardTypeText")
    public String getStandardTypeText() {
        return StandardTypeText;
    }

    public void setStandardTypeText(String standardTypeText) {
        StandardTypeText = standardTypeText;
    }

    @JsonProperty("StandardValue")
    public String getStandardValue() {
        return StandardValue;
    }

    public void setStandardValue(String standardValue) {
        StandardValue = standardValue;
    }

    @JsonProperty("StandardBasic")
    public String getStandardBasic() {
        return StandardBasic;
    }

    public void setStandardBasic(String standardBasic) {
        StandardBasic = standardBasic;
    }

    @JsonProperty("DefaultValue")
    public String getDefaultValue() {
        return DefaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        DefaultValue = defaultValue;
    }

    @JsonProperty("StandardLeft")
    public double getStandardLeft() {
        return StandardLeft;
    }

    public void setStandardLeft(double standardLeft) {
        StandardLeft = standardLeft;
    }

    @JsonProperty("StandardRight")
    public double getStandardRight() {
        return StandardRight;
    }

    public void setStandardRight(double standardRight) {
        StandardRight = standardRight;
    }

    @JsonProperty("CollectionNumber")
    public String getCollectionNumber() {
        return CollectionNumber;
    }

    public void setCollectionNumber(String collectionNumber) {
        CollectionNumber = collectionNumber;
    }

    @JsonProperty("ParamName")
    public String getParamName() {
        return ParamName;
    }

    public void setParamName(String paramName) {
        ParamName = paramName;
    }

    @JsonProperty("UnitID")
    public int getUnitID() {
        return UnitID;
    }

    public void setUnitID(int unitID) {
        UnitID = unitID;
    }

    @JsonProperty("UnitName")
    public String getUnitName() {
        return UnitName;
    }

    public void setUnitName(String unitName) {
        UnitName = unitName;
    }

    @JsonProperty("UnitCode")
    public String getUnitCode() {
        return UnitCode;
    }

    public void setUnitCode(String unitCode) {
        UnitCode = unitCode;
    }

    @JsonProperty("ParamCode")
    public String getParamCode() {
        return ParamCode;
    }

    public void setParamCode(String paramCode) {
        ParamCode = paramCode;
    }
}
